package org.javaongems.test.ve;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class AuthenticationEntry extends JPanel {

	private static final long serialVersionUID = 1L;
	private JLabel lblUser = null;
	private JLabel lblPassword = null;
	private JTextField jTextField = null;
	private JTextField jTextField1 = null;
	private JButton jButton = null;

	/**
	 * This is the default constructor
	 */
	public AuthenticationEntry() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		lblPassword = new JLabel();
		lblPassword.setPreferredSize(new Dimension(80, 16));
		lblPassword.setLocation(new Point(15, 62));
		lblPassword.setSize(new Dimension(80, 20));
		lblPassword.setText("Password");
		lblUser = new JLabel();
		lblUser.setBounds(new Rectangle(15, 21, 80, 20));
		lblUser.setPreferredSize(new Dimension(80, 16));
		lblUser.setText("User name");
		this.setSize(303, 149);
		this.setLayout(null);
		this.add(lblUser, null);
		this.add(lblPassword, null);
		this.add(getJTextField(), null);
		this.add(getJTextField1(), null);
		this.add(getJButton(), null);
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(new Rectangle(138, 21, 118, 20));
		}
		return jTextField;
	}

	/**
	 * This method initializes jTextField1	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField1() {
		if (jTextField1 == null) {
			jTextField1 = new JTextField();
			jTextField1.setBounds(new Rectangle(140, 62, 116, 20));
		}
		return jTextField1;
	}

	/**
	 * This method initializes jButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButton() {
		if (jButton == null) {
			jButton = new JButton();
			jButton.setBounds(new Rectangle(180, 105, 73, 19));
			jButton.setText("Login");
			jButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
				}
			});
		}
		return jButton;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
